package com.cyy.common.utils;

import cn.dev33.satoken.secure.SaSecureUtil;

public class EncryptUtils {

    private final static String KEY = "C-Blog-Key";

    public static boolean validate(String verifyPwd, String encryptPwd) {
        String pwd = SaSecureUtil.aesDecrypt(KEY, encryptPwd);
        return verifyPwd.equals(pwd);
    }

    public static String aesEncrypt(String pwd) {
        return SaSecureUtil.aesEncrypt(KEY, pwd);
    }

//    public static void main(String[] args) {
//        System.out.println(aesEncrypt("123456"));
//    }


}
